"""
Excel 2003 读取示例代码
参考：https://www.cnblogs.com/Forever77/p/11135124.html
"""
import xlrd 

book = xlrd.open_workbook(R'test.xls')
names = book.sheet_names()

sheet = book.sheet_by_name(names[0])
# sheet1 = book.sheet_by_index(0) 

rows = sheet.nrows
cols = sheet.ncols

print('该工作表有%d行，%d列.'%(rows,cols))
for row in range(rows):
    for col in range(cols):
        print(sheet.cell(row, col).value, end=',\t')
    print()
